//
// Flags.hh for caziac in /media/CIBOX USB/Zia/api/Module
// 
// Made by johannick renaud
// Login   <renaud_j@epitech.net>
// 
// Started on  Mon Sep  5 02:40:27 2011 johannick renaud
// Last update Sat Sep 24 18:12:18 2011 johannick renaud
//

#ifndef			CAZIAC_STATUS_HH
# define		CAZIAC_STATUS_HH

/**
 *	\file		Status.hh
 *	\date		Mon Sep  5 2011
 *	\author		RENAUD J.
 *	\version	1.0
 */

#include		"Singleton.hpp"
#include		<string>

namespace		Caziac
{

  /**
   *	\namespace	Http
   *	\brief		namespace for HttpRequest and HttpResponse Handlers
   */

  namespace		Http
  {

    /**
     *	\enum		Status
     *	\brief		Contain all known Http codes values for HTTP/1.1
     */

    enum		Status 
      {

	//=====================================================================//
	//		10x - Message Information			       //
	//=====================================================================//

	CONTINUE			= 100, //(100) the client can continue
	SWITCHING_PROTOCOLS		= 101, //(101) the server is switching protocols according to Upgrade header 

	//=====================================================================//
	//		20x - Request succeed				       //
	//=====================================================================//

	OK				= 200, //(200) the request succeeded normally 
	CREATED				= 201, //(201) the request succeeded and created a new resource on the server 
	ACCEPTED			= 202, //(202) a request was accepted for processing, but was not completed 
	NON_AUTHORITATIVE_INFORMATION	= 203, //(203) the meta information presented by the client did not originate from the server 
	NO_CONTENT			= 204, //(204) the request succeeded but that there was no new information to return 
	RESET_CONTENT			= 205, //(205) the agent SHOULD reset the document view which caused the request to be sent 
	PARTIAL_CONTENT			= 206, //(206) the server has fulfilled the partial GET request for the resource 

	//=====================================================================//
	//		30x - Request redirection			       //
	//=====================================================================//

	MULTIPLE_CHOICES		= 300, //(300) the requested resource corresponds to any one of a set of representations, each with its own specific location 
	MOVED_PERMANENTLY		= 301, //(301) the resource has permanently moved to a new location, and that future references should use a new URI with their requests 
	MOVED_TEMPORARILY		= 302, //(302) the resource has temporarily moved to another location, but that future references should still use the original URI to access the resource 
	SEE_OTHER			= 303, //(303) the response to the request can be found under a different URI 
	NOT_MODIFIED			= 304, //(304) a conditional GET operation found that the resource was available and not modified 
	USE_PROXY			= 305, //(305) the requested resource MUST be accessed through the proxy given by the Location field 
	TEMPORARY_REDIRECT		= 307, //(307) the requested resource resides temporarily under a different URI 

	//=====================================================================//
	//		4xx - Client Error				       //
	//=====================================================================//

	BAD_REQUEST			= 400, //(400) the request sent by the client was syntactically incorrect 
	UNAUTHORIZED			= 401, //(401) the request requires HTTP authentication 
	PAYMENT_REQUIRED		= 402, //(402) reserved for future us 
	FORBIDDEN			= 403, //(403) the server understood the request but refused to fulfill it 
	NOT_FOUND			= 404, //(404) the requested resource is not available 
	METHOD_NOT_ALLOWED		= 405, //(405) the method specified in the Request-Line is not allowed for the resource identified by the Request-URI 
	NOT_ACCEPTABLE			= 406, //(406) the resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request 
	PROXY_AUTHENTICATION_REQUIRED	= 407, //(407) the client MUST first authenticate itself with the proxy 
	REQUEST_TIMEOUT			= 408, //(408) the client did not produce a request within the time that the server was prepared to wait 
	CONFLICT			= 409, //(409) the request could not be completed due to a conflict with the current state of the resource 
	GONE				= 410, //(410) the resource is no longer available at the server and no forwarding address is known 
	LENGTH_REQUIRED			= 411, //(411) the request cannot be handled without a defined Content-Length 
	PRECONDITION_FAILED		= 412, //(412) the precondition given in one or more of the request-header fields evaluated to false when it was tested on the server 
	REQUEST_ENTITY_TOO_LARGE	= 413, //(413) the server is refusing to process the request because the request entity is larger than the server is willing or able to process 
	UNSUPPORTED_MEDIA_TYPE		= 415, //(415) the server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method 
	REQUESTED_RANGE_UNSATISFIABLE	= 416, //(416) the server cannot serve the requested byte range 
	EXPECTATION_FAILED		= 417, //(417) the server could not meet the expectation given in the Expect request header 
	
	//=====================================================================//
	//		50x - Server Error				       //
	//=====================================================================//

	INTERNAL_SERVER_ERROR		= 500, //(500) an error inside the HTTP server which prevented it from fulfilling the request 
	NOT_IMPLEMENTED			= 501, //(501) the HTTP server does not support the functionality needed to fulfill the request 
	BAD_GATEWAY			= 502, //(502) the HTTP server received an invalid response from a server it consulted when acting as a proxy or gateway 
	SERVICE_UNAVAILABLE		= 503, //(503) the HTTP server is temporarily overloaded, and unable to handle the request 
	GATEWAY_TIMEOUT			= 504, //(504) the server did not receive a timely response from the upstream server while acting as a gateway or proxy 
	HTTP_VERSION_UNSUPPORTED	= 505  //(505) the server does not support or refuses to support the HTTP protocol version that was used in the request message

      };

    extern  std::map<Status, std::string> HttpStatus;

  }
}

#endif
